package main

import (
	lxthinkingdatas "gitee.com/lxgow/lxthinkingdata/services"
	"github.com/astaxie/beego/logs"
)

// main
// 创建时间:2024/1/17 16:59
// 创建人:lixu

func main() {

	info, err := lxthinkingdatas.QuerySql(lxthinkingdatas.MQueryConfig{
		ApiUrl:         "http://analysis.d3games.com:8992",
		SQL:            "SELECT sum (\"change_num\")/7 as nums FROM ta.v_event_9 WHERE (\"$part_date\" between '2024-01-10' and '2024-01-16') and \"#account_id\"='671830648' and \"$part_event\"='resource_cost' and \"item_type\"=4 and change_reason='Use'",
		Token:          "dRXGfB80SviFC6pM6pXa0om2Mqms64KUfGic1PPOJoRVvHjkcBNrrVFy4XWqEzj9",
		Format:         "csv",
		TimeOutSeconds: 10,
	})

	logs.Error(string(info.BodyByte), err)

}
